/*
 * 
 * Libman
 * 
 * Daniel Kaufmann, Martin Lang, Simon Moosbrugger,
 * Stefan Mayer, Stephan Halbeisen
 * 
 */
package application.server;

import java.rmi.RemoteException;

import application.controller.server.UseCaseControllerLoanExtend;
import application.exceptions.DataInconsistentException;
import application.exceptions.DatabaseException;
import application.exceptions.ExemplarNotFoundException;
import application.exceptions.ExtendNotAllowedException;
import application.exceptions.LoanExtendNotPossibleException;
import application.exceptions.LoanNotFoundException;
import application.exceptions.NotLoanedException;

/**
 * The Class LoanExtendRemoteImpl.
 */
public class LoanExtendRemoteImpl extends AbstractRemoteImpl implements
		LoanExtendRemote {
	
	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 1025410290764791897L;
	
	/** The _controller. */
	private UseCaseControllerLoanExtend _controller;

	/**
	 * Instantiates a new loan extend remote impl.
	 * 
	 * @throws RemoteException
	 *             the remote exception
	 */
	public LoanExtendRemoteImpl() throws RemoteException {
		super();
		_controller = new UseCaseControllerLoanExtend();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see application.server.LoanExtendRemote#extend(int)
	 */
	@Override
	public void extend(int exemplarID) throws RemoteException,
			LoanExtendNotPossibleException, DatabaseException,
			LoanNotFoundException, ExtendNotAllowedException,
			ExemplarNotFoundException, DataInconsistentException,
			NotLoanedException {
		_controller.extend(exemplarID);
	}

}
